package exercise7;

import java.util.Scanner;

public class Letters extends BaseExample {
	public int countLetters(String s) {
		int count = 0;
		for (char ch : s.toCharArray()) {
		if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
				count++;
		}
		return count;
	}
	public void print() {
		@SuppressWarnings("resource")
		Scanner in=new Scanner(System.in);
		this.logger.debug("请输入字符串");
		String string=in.next();
		this.logger.debug(countLetters(string));
	}
}
